﻿<Window x:Class="WpfMembershipAdmin.UserDetailsWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="UserDetailsWindow" Height="288" Width="385" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded">
    <DockPanel>
        <!-- TODO: use data binding -->
        <DockPanel DockPanel.Dock="Bottom">
            <Button Name="btnCancel" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="100" Margin="5,5,5,5" Click="btnCancel_Click">Cancel</Button>
            <Button Name="btnOk" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="100" Margin="5,5,5,5" Click="btnOk_Click">OK</Button>
        </DockPanel>
        <TabControl>
            <TabItem Header="User">
                <DockPanel>
                    <StackPanel Name="ObjectPropertyStackPanel">
                        <DockPanel>
                            <Label DockPanel.Dock="Left" Width="110">Username:</Label>
                            <Label Name="lblUsername"></Label>
                        </DockPanel>
                        <DockPanel>
                            <Label DockPanel.Dock="Left" Width="110">Email Address:</Label>
                            <TextBox Name="txtEmailAddress"></TextBox>
                        </DockPanel>
                        <DockPanel>
                            <Label DockPanel.Dock="Left" VerticalContentAlignment="Center" Width="110">Password:</Label>
                            <Button DockPanel.Dock="Right" Width="100" Margin="5,5,5,5" Name="btnResetPassword" Click="btnResetPassword_Click">Reset</Button>
                            <Button DockPanel.Dock="Right" Width="100" Margin="5,5,5,5" Name="btnRetrievePassword" Click="btnRetrievePassword_Click">Retrieve</Button>
                        </DockPanel>
                    </StackPanel>
                </DockPanel>
            </TabItem>
            <TabItem Header="Roles">
                <DockPanel>
                    <DockPanel DockPanel.Dock="Bottom">
                        <Button Name="btnDeleteRoles" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="100" Margin="5,5,5,5" Click="btnDeleteRoles_Click">Remove Roles</Button>
                        <Button Name="btnSelectRoles" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="100" Margin="5,5,5,5" Click="btnSelectRoles_Click">Add Roles</Button>
                    </DockPanel>
                    <StackPanel>
                        <Label>User currently belongs to these Roles:</Label>
                        <ListView Name="userRoleList"></ListView>
                    </StackPanel>
                </DockPanel>
            </TabItem>
            <TabItem Header="Status">
                <StackPanel>
                    <WrapPanel>
                        <Label>Creation Date</Label>
                        <Label Name="lblCreationDate" />
                    </WrapPanel>
                    <WrapPanel>
                        <Label>Last Activity Date</Label>
                        <Label Name="lblLastActivityDate" />
                    </WrapPanel>
                    <WrapPanel>
                        <Label>Last Login Date</Label>
                        <Label Name="lblLastLoginDate" />
                    </WrapPanel>
                    <WrapPanel>
                        <Label>Last Password Changed Date</Label>
                        <Label Name="lblLastPasswordChangedDate" />
                    </WrapPanel>
                    <WrapPanel>
                        <Label>Last Lockout Date</Label>
                        <Label Name="lblLastLockoutDate" />
                    </WrapPanel>
                    <CheckBox Name="chkApproved" Content="Is Approved"  />
                    <CheckBox Name="chkLockedOut" Content="Is Locked Out" Click="chkLockedOut_Click" />
                    <CheckBox Name="chkOnline" IsEnabled="False" Content="Is Online" />
                    <TextBlock Name="txtComment" />
                </StackPanel>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>
